#include "widget_network.h"
#include "players.h"
#include "gui.h"



network_widget::network_widget( player* pl, QPushButton* nb, QWidget* parent, Qt::WindowFlags flags ): QWidget( parent, flags )
{
	next_b = nb;
	next_b->setEnabled( false );
	plr = pl;
	QVBoxLayout* layout = new QVBoxLayout( this );

	QLabel* title_l = new QLabel( this );
	title_l->setTextFormat( Qt::RichText );
	ostringstream sout;
	sout << "<font size=6>" << pl->get_name() << " :</font>";
	title_l->setText( sout.str().c_str() );

	layout->addWidget( title_l );

	layout->addSpacing( 20 );

	QLabel* waiting_l = new QLabel( this );
	waiting_l->setTextFormat( Qt::RichText );
	waiting_l->setText( "<b><font size=6>Waiting for player until he finishes buying units.</font></b>" );
	layout->addWidget( waiting_l );

	layout->addStretch();
	
	this->setLayout( layout );
};